<template>
  <div>
    <router-view v-slot="{ Component }">
      <el-alert :closable="false" title="menu 1">
        <component :is="Component" />
      </el-alert>
      <el-button @click="showComponent(Component)">showComponentFather(Component)</el-button>
    </router-view>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
onMounted(()=>{
  console.log('onMounted');
  //console.log('Component',Component);
})
const showComponent=(Component)=>{
  console.log('Component',Component);
}

</script>